<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>简易计算器 | MXY 1.0版Python整理</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../home/12.Python实战项目/2.自动售货机.html" />
    
    
    <link rel="prev" href="../../home/11.多任务/3.协程实现多任务.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="12.1"
        data-chapter-title="简易计算器"
        data-filepath="home/12.Python实战项目/1.简易计算器.md"
        data-basepath="../.."
        data-revision="Mon Oct 22 2018 08:32:35 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        MXY整理版Python基础
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" >
            
            <span><b>1.</b> Python的安装和简介</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="home/1.Python的安装和简介/1.python基础知识.html">
            
                
                    <a href="../../home/1.Python的安装和简介/1.python基础知识.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        Python的基础知识
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="home/1.Python的安装和简介/2.python的安装及版本检测.html">
            
                
                    <a href="../../home/1.Python的安装和简介/2.python的安装及版本检测.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        Python安装及版本检测
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="home/1.Python的安装和简介/3.第一个python程序.html">
            
                
                    <a href="../../home/1.Python的安装和简介/3.第一个python程序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        第一个Python程序
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" >
            
            <span><b>2.</b> Python的基本语法</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="home/2.Python的基本语法/1.注释及语句分类.html">
            
                
                    <a href="../../home/2.Python的基本语法/1.注释及语句分类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        注释及语句分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="home/2.Python的基本语法/2.命名方式和关键字.html">
            
                
                    <a href="../../home/2.Python的基本语法/2.命名方式和关键字.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        命名方式和关键字
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" >
            
            <span><b>3.</b> Python的变量及数据类型</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="home/3.变量和数据类型/1.变量.html">
            
                
                    <a href="../../home/3.变量和数据类型/1.变量.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="home/3.变量和数据类型/2.数据类型.html">
            
                
                    <a href="../../home/3.变量和数据类型/2.数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="home/3.变量和数据类型/3.数据类型转换.html">
            
                
                    <a href="../../home/3.变量和数据类型/3.数据类型转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        数据类型转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="home/3.变量和数据类型/4.运算和运算符.html">
            
                
                    <a href="../../home/3.变量和数据类型/4.运算和运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        数据类型转换
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" >
            
            <span><b>4.</b> Python的流程控制</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="home/4.流程控制/1.顺序结构和分支结构.html">
            
                
                    <a href="../../home/4.流程控制/1.顺序结构和分支结构.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        顺序结构和分支结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="home/4.流程控制/2.循环结构.html">
            
                
                    <a href="../../home/4.流程控制/2.循环结构.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        循环结构
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" >
            
            <span><b>5.</b> 函数及作用域</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="home/5.函数及作用域/1.函数.html">
            
                
                    <a href="../../home/5.函数及作用域/1.函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="home/5.函数及作用域/2.函数文档.html">
            
                
                    <a href="../../home/5.函数及作用域/2.函数文档.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        函数文档
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="home/5.函数及作用域/3.变量的作用域.html">
            
                
                    <a href="../../home/5.函数及作用域/3.变量的作用域.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        变量的作用域
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="home/5.函数及作用域/4.内部函数和闭包操作.html">
            
                
                    <a href="../../home/5.函数及作用域/4.内部函数和闭包操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        内部函数和闭包操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="home/5.函数及作用域/5.lambda表达式.html">
            
                
                    <a href="../../home/5.函数及作用域/5.lambda表达式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        lambda表达式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="home/5.函数及作用域/6.高阶函数.html">
            
                
                    <a href="../../home/5.函数及作用域/6.高阶函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        高阶函数
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" >
            
            <span><b>6.</b> 内置函数及操作</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="home/6.内置函数及操作/1.字符串相关.html">
            
                
                    <a href="../../home/6.内置函数及操作/1.字符串相关.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        字符串相关
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="home/6.内置函数及操作/2.format格式字符串.html">
            
                
                    <a href="../../home/6.内置函数及操作/2.format格式字符串.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        format格式字符串
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="home/6.内置函数及操作/3.内建函数.html">
            
                
                    <a href="../../home/6.内置函数及操作/3.内建函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        内建函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="home/6.内置函数及操作/4.列表.html">
            
                
                    <a href="../../home/6.内置函数及操作/4.列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="home/6.内置函数及操作/5.元组.html">
            
                
                    <a href="../../home/6.内置函数及操作/5.元组.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        元组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="home/6.内置函数及操作/6.字典.html">
            
                
                    <a href="../../home/6.内置函数及操作/6.字典.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        字典
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.7" data-path="home/6.内置函数及操作/7.集合.html">
            
                
                    <a href="../../home/6.内置函数及操作/7.集合.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.</b>
                        
                        集合
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.8" data-path="home/6.内置函数及操作/8.文件操作.html">
            
                
                    <a href="../../home/6.内置函数及操作/8.文件操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.8.</b>
                        
                        文件操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" >
            
            <span><b>7.</b> 常用的模块</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="home/7.常用模块/1.String模块.html">
            
                
                    <a href="../../home/7.常用模块/1.String模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        String模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="home/7.常用模块/2.math模块.html">
            
                
                    <a href="../../home/7.常用模块/2.math模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        math模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="home/7.常用模块/3.OS模块.html">
            
                
                    <a href="../../home/7.常用模块/3.OS模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        OS模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="home/7.常用模块/4.zipfile模块.html">
            
                
                    <a href="../../home/7.常用模块/4.zipfile模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        zipfile模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="home/7.常用模块/5.tarfile模块.html">
            
                
                    <a href="../../home/7.常用模块/5.tarfile模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.5.</b>
                        
                        tarfile模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="home/7.常用模块/6.shutil模块.html">
            
                
                    <a href="../../home/7.常用模块/6.shutil模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.6.</b>
                        
                        shutil模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.7" data-path="home/7.常用模块/7.时间相关模块.html">
            
                
                    <a href="../../home/7.常用模块/7.时间相关模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.7.</b>
                        
                        时间相关模块
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" >
            
            <span><b>8.</b> 面向对象</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="home/8.面向对象/1.类和对象-上.html">
            
                
                    <a href="../../home/8.面向对象/1.类和对象-上.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        类和对象-上
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="home/8.面向对象/2.类和对象-下.html">
            
                
                    <a href="../../home/8.面向对象/2.类和对象-下.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.</b>
                        
                        类和对象-下
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.3" data-path="home/8.面向对象/3.魔术方法.html">
            
                
                    <a href="../../home/8.面向对象/3.魔术方法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.3.</b>
                        
                        魔术方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.4" data-path="home/8.面向对象/4.装饰器.html">
            
                
                    <a href="../../home/8.面向对象/4.装饰器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.4.</b>
                        
                        装饰器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.5" data-path="home/8.面向对象/5.抽象类.html">
            
                
                    <a href="../../home/8.面向对象/5.抽象类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.5.</b>
                        
                        抽象类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.6" data-path="home/8.面向对象/6.错误和异常处理.html">
            
                
                    <a href="../../home/8.面向对象/6.错误和异常处理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.6.</b>
                        
                        错误和异常处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.7" data-path="home/8.面向对象/7.模块和包.html">
            
                
                    <a href="../../home/8.面向对象/7.模块和包.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.7.</b>
                        
                        模块和包
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" >
            
            <span><b>9.</b> tkinter模块</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="home/9.tkinter模块/tkinter模块.html">
            
                
                    <a href="../../home/9.tkinter模块/tkinter模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        tkinter模块
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="home/10.网络编程/1.网络编程.html">
            
                
                    <a href="../../home/10.网络编程/1.网络编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        网络编程
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1" data-path="home/10.网络编程/2.TCP编程.html">
            
                
                    <a href="../../home/10.网络编程/2.TCP编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.</b>
                        
                        TCP编程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="home/10.网络编程/3.UDP编程.html">
            
                
                    <a href="../../home/10.网络编程/3.UDP编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.</b>
                        
                        UDP编程
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="11" data-path="home/11.多任务/多任务原理.html">
            
                
                    <a href="../../home/11.多任务/多任务原理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.</b>
                        
                        多任务
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="11.1" data-path="home/11.多任务/1.多进程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/1.多进程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.1.</b>
                        
                        多进程实现多任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.2" data-path="home/11.多任务/2.多线程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/2.多线程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.2.</b>
                        
                        多线程实现多任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.3" data-path="home/11.多任务/3.协程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/3.协程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.3.</b>
                        
                        协程实现多任务
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="12" >
            
            <span><b>12.</b> Python实战项目</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="12.1" data-path="home/12.Python实战项目/1.简易计算器.html">
            
                
                    <a href="../../home/12.Python实战项目/1.简易计算器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.1.</b>
                        
                        简易计算器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.2" data-path="home/12.Python实战项目/2.自动售货机.html">
            
                
                    <a href="../../home/12.Python实战项目/2.自动售货机.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.2.</b>
                        
                        自动售货机
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.3" data-path="home/12.Python实战项目/3.银行项目.html">
            
                
                    <a href="../../home/12.Python实战项目/3.银行项目.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.3.</b>
                        
                        银行项目
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.4" data-path="home/12.Python实战项目/4.简单的登录注册.html">
            
                
                    <a href="../../home/12.Python实战项目/4.简单的登录注册.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.4.</b>
                        
                        简单的登录注册
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.5" data-path="home/12.Python实战项目/5.双色球.html">
            
                
                    <a href="../../home/12.Python实战项目/5.双色球.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.5.</b>
                        
                        双色球
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.6" data-path="home/12.Python实战项目/6.python垃圾回收机制.html">
            
                
                    <a href="../../home/12.Python实战项目/6.python垃圾回收机制.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.6.</b>
                        
                        python垃圾回收机制
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.7" data-path="home/12.Python实战项目/7.turtle画国旗.html">
            
                
                    <a href="../../home/12.Python实战项目/7.turtle画国旗.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.7.</b>
                        
                        turtle画国旗
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.8" data-path="home/12.Python实战项目/8.turtle画小猪佩奇.html">
            
                
                    <a href="../../home/12.Python实战项目/8.turtle画小猪佩奇.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.8.</b>
                        
                        turtle画小猪佩奇
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.9" data-path="home/12.Python实战项目/9.turtle画个表.html">
            
                
                    <a href="../../home/12.Python实战项目/9.turtle画个表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.9.</b>
                        
                        turtle画个表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >MXY 1.0版Python整理</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x7B80;&#x6613;&#x8BA1;&#x7B97;&#x5668;&#x9879;&#x76EE;">&#x7B80;&#x6613;&#x8BA1;&#x7B97;&#x5668;&#x9879;&#x76EE;</h1>
<hr>
<ul>
<li><h3 id="&#x5BFC;&#x5305;&#x7B49;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;">&#x5BFC;&#x5305;&#x7B49;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;</h3>
<pre><code class="lang-py">  <span class="hljs-comment"># -*- coding:utf-8 -*-</span>

  <span class="hljs-keyword">from</span> tkinter <span class="hljs-keyword">import</span> *

  win = Tk()
  win.title(<span class="hljs-string">&quot;KAFKA.1.0 &#x7248;&#x8BA1;&#x7B97;&#x5668;&quot;</span>)
  win.geometry(<span class="hljs-string">&quot;300x400+200+200&quot;</span>)

  frame_show = Frame(width=<span class="hljs-number">260</span>, height=<span class="hljs-number">150</span>, bg=<span class="hljs-string">&quot;#37ACA6&quot;</span>)
</code></pre>
</li>
<li><h3 id="&#x9876;&#x90E8;&#x533A;&#x57DF;">&#x9876;&#x90E8;&#x533A;&#x57DF;</h3>
<p>  ```py
  v = StringVar()
  v.set(&apos;0&apos;)
  show_label = Label(frame_show, textvariable=v, bg=&apos;#575956&apos;, fg=&apos;#FFFFFF&apos;, width=12, height=1, font=(&apos;&#x5FAE;&#x8F6F;&#x96C5;&#x9ED1;&apos;, 15, &apos;bold&apos;), justify=LEFT, anchor=&apos;e&apos;)
  show_label.pack(padx=10, pady=10)
  frame_show.pack()</p>
<h1 id="&#x662F;&#x5426;&#x6309;&#x4E0B;&#x4E86;&#x8FD0;&#x7B97;&#x7B26;">&#x662F;&#x5426;&#x6309;&#x4E0B;&#x4E86;&#x8FD0;&#x7B97;&#x7B26;</h1>
<p>  isopear = False</p>
<h1 id="&#x64CD;&#x4F5C;&#x5E8F;&#x5217;">&#x64CD;&#x4F5C;&#x5E8F;&#x5217;</h1>
<p>  calc = []</p>
</li>
</ul>
<pre><code>def change(num):
    global isopear
    if isopear == False:
        if v.get() == &apos;0&apos;:
            v.set(&apos;&apos;)
            v.set(num)
        else:
            v.set(v.get() + num)
    else:
        v.set(num)
        isopear = False
```
</code></pre><ul>
<li><h3 id="&#x8FD0;&#x7B97;">&#x8FD0;&#x7B97;</h3>
<pre><code class="lang-py">  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">operation</span><span class="hljs-params">(sign)</span>:</span>
      <span class="hljs-keyword">global</span> isopear
      <span class="hljs-keyword">global</span> cals
      isopear = <span class="hljs-keyword">True</span>
      calc.append(v.get())
      <span class="hljs-keyword">if</span> sign == <span class="hljs-string">&apos;+&apos;</span>:
          calc.append(<span class="hljs-string">&apos;+&apos;</span>)
      <span class="hljs-keyword">elif</span> sign == <span class="hljs-string">&apos;-&apos;</span>:
          calc.append(<span class="hljs-string">&apos;-&apos;</span>)
      <span class="hljs-keyword">elif</span> sign == <span class="hljs-string">&apos;*&apos;</span>:
          calc.append(<span class="hljs-string">&apos;*&apos;</span>)
      <span class="hljs-keyword">elif</span> sign == <span class="hljs-string">&apos;/&apos;</span>:
          calc.append(<span class="hljs-string">&apos;/&apos;</span>)
      print(calc)
</code></pre>
</li>
<li><h3 id="&#x7B49;&#x53F7;&#x64CD;&#x4F5C;">&#x7B49;&#x53F7;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-py">  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">equal</span><span class="hljs-params">()</span>:</span>
      <span class="hljs-keyword">global</span> calc

      <span class="hljs-comment"># &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x754C;&#x9762;&#x7684;&#x6570;&#x503C;&#x51C6;&#x5907;&#x8FD0;&#x7B97;</span>
      calc.append(v.get())
      print(calc)

      <span class="hljs-comment"># &#x7EC4;&#x6210;&#x8FD0;&#x7B97;&#x5B57;&#x7B26;&#x4E32;</span>
      calcstr = <span class="hljs-string">&apos;&apos;</span>.join(calc)

      <span class="hljs-comment"># &#x68C0;&#x6D4B;&#x6700;&#x540E;&#x4E00;&#x4F4D;&#x662F;&#x5426;&#x662F;&#x8FD0;&#x7B97;&#x7B26;&#xFF0C;&#x662F;&#x5C31;&#x5220;&#x9664;</span>
      <span class="hljs-keyword">if</span> calcstr[-<span class="hljs-number">1</span>] <span class="hljs-keyword">in</span> <span class="hljs-string">&apos;+-*/&apos;</span>:
          calcstr = calcstr[:-<span class="hljs-number">1</span>]
      print(calcstr)

      <span class="hljs-comment"># &#x8FD0;&#x7B97;&#x64CD;&#x4F5C;</span>
      result = eval(calcstr)
      <span class="hljs-comment"># &#x663E;&#x793A;&#x7ED3;&#x679C;</span>
      v.set(result)
      calc.clear()
</code></pre>
</li>
<li><h3 id="&#x5220;&#x9664;&#x64CD;&#x4F5C;">&#x5220;&#x9664;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-py">  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">delete</span><span class="hljs-params">()</span>:</span>
      <span class="hljs-keyword">if</span> v.get() == <span class="hljs-string">&apos;&apos;</span> <span class="hljs-keyword">or</span> v.get() == <span class="hljs-string">&apos;0&apos;</span>:
          v.set(<span class="hljs-string">&apos;0&apos;</span>)
          <span class="hljs-keyword">return</span>
      <span class="hljs-keyword">else</span>:
          num = len(v.get())
          <span class="hljs-keyword">if</span> num &gt; <span class="hljs-number">1</span>:
              strnum = v.get()[:num-<span class="hljs-number">1</span>]
              v.set(strnum)
          <span class="hljs-keyword">else</span>:
              v.set(<span class="hljs-string">&apos;0&apos;</span>)
</code></pre>
</li>
<li><h3 id="&#x6E05;&#x7A7A;&#x64CD;&#x4F5C;">&#x6E05;&#x7A7A;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-py">  <span class="hljs-comment"># &#x6E05;&#x7A7A;&#x64CD;&#x4F5C;</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">clear</span><span class="hljs-params">()</span>:</span>
      <span class="hljs-keyword">global</span> calc
      calc = []
      v.set(<span class="hljs-string">&apos;0&apos;</span>)
      isopear = <span class="hljs-keyword">False</span>
</code></pre>
</li>
<li><h3 id="&#x6B63;&#x8D1F;&#x64CD;&#x4F5C;">&#x6B63;&#x8D1F;&#x64CD;&#x4F5C;</h3>
<pre><code class="lang-py">  <span class="hljs-comment"># &#x6B63;&#x8D1F;&#x64CD;&#x4F5C;</span>
  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">fan</span><span class="hljs-params">()</span>:</span>
      strnum = v.get()
      <span class="hljs-keyword">if</span> strnum[<span class="hljs-number">0</span>] == <span class="hljs-string">&apos;-&apos;</span>:
          v.set(strnum[<span class="hljs-number">1</span>:])
      <span class="hljs-keyword">elif</span> strnum[<span class="hljs-number">0</span>] != <span class="hljs-string">&apos;-&apos;</span> <span class="hljs-keyword">and</span> strnum != <span class="hljs-string">&apos;0&apos;</span>:
          v.set(<span class="hljs-string">&apos;-&apos;</span> + strnum)
</code></pre>
</li>
<li><h3 id="&#x6309;&#x952E;&#x533A;&#x57DF;">&#x6309;&#x952E;&#x533A;&#x57DF;</h3>
<pre><code class="lang-py">  frame_bord = Frame(width=<span class="hljs-number">400</span>, height=<span class="hljs-number">350</span>, bg=<span class="hljs-string">&apos;#575956&apos;</span>)

  button_del = Button(frame_bord, text=<span class="hljs-string">&apos;&lt;--&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">1</span>, command=delete).grid(row=<span class="hljs-number">0</span>, column=<span class="hljs-number">0</span>)
  button_clear = Button(frame_bord, text=<span class="hljs-string">&apos;C&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">1</span>, command=clear).grid(row=<span class="hljs-number">0</span>, column=<span class="hljs-number">1</span>)
  button_fan = Button(frame_bord, text=<span class="hljs-string">&apos;&#xB1;&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">1</span>, command=fan).grid(row=<span class="hljs-number">0</span>, column=<span class="hljs-number">2</span>)
  button_ce = Button(frame_bord, text=<span class="hljs-string">&apos;CE&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">1</span>, command=clear).grid(row=<span class="hljs-number">0</span>, column=<span class="hljs-number">3</span>)

  button_1 = Button(frame_bord, text=<span class="hljs-string">&apos;1&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;1&apos;</span>)).grid(row=<span class="hljs-number">1</span>, column=<span class="hljs-number">0</span>)
  button_2 = Button(frame_bord, text=<span class="hljs-string">&apos;2&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;2&apos;</span>)).grid(row=<span class="hljs-number">1</span>, column=<span class="hljs-number">1</span>)
  button_3 = Button(frame_bord, text=<span class="hljs-string">&apos;3&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;3&apos;</span>)).grid(row=<span class="hljs-number">1</span>, column=<span class="hljs-number">2</span>)
  button_jia = Button(frame_bord, text=<span class="hljs-string">&apos;+&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: operation(<span class="hljs-string">&apos;+&apos;</span>)).grid(row=<span class="hljs-number">1</span>, column=<span class="hljs-number">3</span>)

  button_4 = Button(frame_bord, text=<span class="hljs-string">&apos;4&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;4&apos;</span>)).grid(row=<span class="hljs-number">2</span>, column=<span class="hljs-number">0</span>)
  button_5 = Button(frame_bord, text=<span class="hljs-string">&apos;5&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;5&apos;</span>)).grid(row=<span class="hljs-number">2</span>, column=<span class="hljs-number">1</span>)
  button_6 = Button(frame_bord, text=<span class="hljs-string">&apos;6&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;6&apos;</span>)).grid(row=<span class="hljs-number">2</span>, column=<span class="hljs-number">2</span>)
  button_jian = Button(frame_bord, text=<span class="hljs-string">&apos;-&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: operation(<span class="hljs-string">&apos;-&apos;</span>)).grid(row=<span class="hljs-number">2</span>, column=<span class="hljs-number">3</span>)

  button_7 = Button(frame_bord, text=<span class="hljs-string">&apos;7&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;7&apos;</span>)).grid(row=<span class="hljs-number">3</span>, column=<span class="hljs-number">0</span>)
  button_8 = Button(frame_bord, text=<span class="hljs-string">&apos;8&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;8&apos;</span>)).grid(row=<span class="hljs-number">3</span>, column=<span class="hljs-number">1</span>)
  button_9 = Button(frame_bord, text=<span class="hljs-string">&apos;9&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;9&apos;</span>)).grid(row=<span class="hljs-number">3</span>, column=<span class="hljs-number">2</span>)
  button_x = Button(frame_bord, text=<span class="hljs-string">&apos;x&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;*&apos;</span>)).grid(row=<span class="hljs-number">3</span>, column=<span class="hljs-number">3</span>)

  button_0 = Button(frame_bord, text=<span class="hljs-string">&apos;0&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;0&apos;</span>)).grid(row=<span class="hljs-number">4</span>, column=<span class="hljs-number">0</span>)
  button_dian = Button(frame_bord, text=<span class="hljs-string">&apos;.&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: change(<span class="hljs-string">&apos;.&apos;</span>)).grid(row=<span class="hljs-number">4</span>, column=<span class="hljs-number">1</span>)
  button_deng = Button(frame_bord, text=<span class="hljs-string">&apos;=&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=equal).grid(row=<span class="hljs-number">4</span>, column=<span class="hljs-number">2</span>)
  button_chu = Button(frame_bord, text=<span class="hljs-string">&apos;/&apos;</span>, width=<span class="hljs-number">5</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: operation(<span class="hljs-string">&apos;/&apos;</span>)).grid(row=<span class="hljs-number">4</span>, column=<span class="hljs-number">3</span>)

  button_auther = Button(frame_bord, text=<span class="hljs-string">&apos;&#x67E5;&#x770B;&#x4F5C;&#x8005;&apos;</span>, width=<span class="hljs-number">25</span>, height=<span class="hljs-number">2</span>, command=<span class="hljs-keyword">lambda</span>: print(<span class="hljs-string">&quot;KAFKA.M&quot;</span>)).grid(row=<span class="hljs-number">5</span>, column=<span class="hljs-number">0</span>, columnspan=<span class="hljs-number">4</span>)

  frame_bord.pack(padx=<span class="hljs-number">20</span>, pady=<span class="hljs-number">20</span>)
</code></pre>
</li>
<li><h3 id="&#x5E95;&#x90E8;&#x533A;&#x57DF;">&#x5E95;&#x90E8;&#x533A;&#x57DF;</h3>
<pre><code class="lang-py">  frame_bottom = Frame(width=<span class="hljs-number">400</span>, height=<span class="hljs-number">10</span>, bg=<span class="hljs-string">&apos;#575956&apos;</span>)
  bottom_label = Label(frame_bottom, text=<span class="hljs-string">&apos;by KAFKA.M&apos;</span>, bg=<span class="hljs-string">&apos;#37ACA6&apos;</span>, fg=<span class="hljs-string">&apos;#FFFFFF&apos;</span>, font=(<span class="hljs-string">&apos;&#x5FAE;&#x8F6F;&#x96C5;&#x9ED1;&apos;</span>, <span class="hljs-number">12</span>, <span class="hljs-string">&apos;bold&apos;</span>), width=<span class="hljs-number">18</span>, height=<span class="hljs-number">1</span>, padx=<span class="hljs-number">0</span>)
  bottom_label.pack()
  frame_bottom.pack()

  win.mainloop()
</code></pre>
</li>
</ul>
<ul>
<li><h3 id="&#x6574;&#x4F53;&#x4EE3;&#x7801;">&#x6574;&#x4F53;&#x4EE3;&#x7801;</h3>
<p>  ```py</p>
<h1 id="codingutf8-">-<em>- coding:utf-8 -</em>-</h1>
<p>  from tkinter import *</p>
<p>  win = Tk()
  win.title(&quot;KAFKA.1.0 &#x7248;&#x8BA1;&#x7B97;&#x5668;&quot;)
  win.geometry(&quot;300x400+200+200&quot;)</p>
<p>  frame_show = Frame(width=260, height=150, bg=&quot;#37ACA6&quot;)</p>
<h1 id="&#x9876;&#x90E8;&#x533A;&#x57DF;">&#x9876;&#x90E8;&#x533A;&#x57DF;</h1>
<p>  v = StringVar()
  v.set(&apos;0&apos;)
  show_label = Label(frame_show, textvariable=v, bg=&apos;#575956&apos;, fg=&apos;#FFFFFF&apos;, width=12, height=1, font=(&apos;&#x5FAE;&#x8F6F;&#x96C5;&#x9ED1;&apos;, 15, &apos;bold&apos;), justify=LEFT, anchor=&apos;e&apos;)
  show_label.pack(padx=10, pady=10)
  frame_show.pack()</p>
<h1 id="&#x662F;&#x5426;&#x6309;&#x4E0B;&#x4E86;&#x8FD0;&#x7B97;&#x7B26;">&#x662F;&#x5426;&#x6309;&#x4E0B;&#x4E86;&#x8FD0;&#x7B97;&#x7B26;</h1>
<p>  isopear = False</p>
<h1 id="&#x64CD;&#x4F5C;&#x5E8F;&#x5217;">&#x64CD;&#x4F5C;&#x5E8F;&#x5217;</h1>
<p>  calc = []</p>
</li>
</ul>
<pre><code>def change(num):
    global isopear
    if isopear == False:
        if v.get() == &apos;0&apos;:
            v.set(&apos;&apos;)
            v.set(num)
        else:
            v.set(v.get() + num)
    else:
        v.set(num)
        isopear = False


# &#x8FD0;&#x7B97;
def operation(sign):
    global isopear
    global cals
    isopear = True
    calc.append(v.get())
    if sign == &apos;+&apos;:
        calc.append(&apos;+&apos;)
    elif sign == &apos;-&apos;:
        calc.append(&apos;-&apos;)
    elif sign == &apos;*&apos;:
        calc.append(&apos;*&apos;)
    elif sign == &apos;/&apos;:
        calc.append(&apos;/&apos;)
    print(calc)


# &#x7B49;&#x53F7;&#x64CD;&#x4F5C;
def equal():
    global calc

    # &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x754C;&#x9762;&#x7684;&#x6570;&#x503C;&#x51C6;&#x5907;&#x8FD0;&#x7B97;
    calc.append(v.get())
    print(calc)

    # &#x7EC4;&#x6210;&#x8FD0;&#x7B97;&#x5B57;&#x7B26;&#x4E32;
    calcstr = &apos;&apos;.join(calc)

    # &#x68C0;&#x6D4B;&#x6700;&#x540E;&#x4E00;&#x4F4D;&#x662F;&#x5426;&#x662F;&#x8FD0;&#x7B97;&#x7B26;&#xFF0C;&#x662F;&#x5C31;&#x5220;&#x9664;
    if calcstr[-1] in &apos;+-*/&apos;:
        calcstr = calcstr[:-1]
    print(calcstr)

    # &#x8FD0;&#x7B97;&#x64CD;&#x4F5C;
    result = eval(calcstr)
    # &#x663E;&#x793A;&#x7ED3;&#x679C;
    v.set(result)
    calc.clear()


# &#x5220;&#x9664;&#x64CD;&#x4F5C;
def delete():
    if v.get() == &apos;&apos; or v.get() == &apos;0&apos;:
        v.set(&apos;0&apos;)
        return
    else:
        num = len(v.get())
        if num &gt; 1:
            strnum = v.get()[:num-1]
            v.set(strnum)
        else:
            v.set(&apos;0&apos;)


# &#x6E05;&#x7A7A;&#x64CD;&#x4F5C;
def clear():
    global calc
    calc = []
    v.set(&apos;0&apos;)
    isopear = False


# &#x6B63;&#x8D1F;&#x64CD;&#x4F5C;
def fan():
    strnum = v.get()
    if strnum[0] == &apos;-&apos;:
        v.set(strnum[1:])
    elif strnum[0] != &apos;-&apos; and strnum != &apos;0&apos;:
        v.set(&apos;-&apos; + strnum)

# &#x6309;&#x952E;&#x533A;&#x57DF;
frame_bord = Frame(width=400, height=350, bg=&apos;#575956&apos;)

button_del = Button(frame_bord, text=&apos;&lt;--&apos;, width=5, height=1, command=delete).grid(row=0, column=0)
button_clear = Button(frame_bord, text=&apos;C&apos;, width=5, height=1, command=clear).grid(row=0, column=1)
button_fan = Button(frame_bord, text=&apos;&#xB1;&apos;, width=5, height=1, command=fan).grid(row=0, column=2)
button_ce = Button(frame_bord, text=&apos;CE&apos;, width=5, height=1, command=clear).grid(row=0, column=3)

button_1 = Button(frame_bord, text=&apos;1&apos;, width=5, height=2, command=lambda: change(&apos;1&apos;)).grid(row=1, column=0)
button_2 = Button(frame_bord, text=&apos;2&apos;, width=5, height=2, command=lambda: change(&apos;2&apos;)).grid(row=1, column=1)
button_3 = Button(frame_bord, text=&apos;3&apos;, width=5, height=2, command=lambda: change(&apos;3&apos;)).grid(row=1, column=2)
button_jia = Button(frame_bord, text=&apos;+&apos;, width=5, height=2, command=lambda: operation(&apos;+&apos;)).grid(row=1, column=3)

button_4 = Button(frame_bord, text=&apos;4&apos;, width=5, height=2, command=lambda: change(&apos;4&apos;)).grid(row=2, column=0)
button_5 = Button(frame_bord, text=&apos;5&apos;, width=5, height=2, command=lambda: change(&apos;5&apos;)).grid(row=2, column=1)
button_6 = Button(frame_bord, text=&apos;6&apos;, width=5, height=2, command=lambda: change(&apos;6&apos;)).grid(row=2, column=2)
button_jian = Button(frame_bord, text=&apos;-&apos;, width=5, height=2, command=lambda: operation(&apos;-&apos;)).grid(row=2, column=3)

button_7 = Button(frame_bord, text=&apos;7&apos;, width=5, height=2, command=lambda: change(&apos;7&apos;)).grid(row=3, column=0)
button_8 = Button(frame_bord, text=&apos;8&apos;, width=5, height=2, command=lambda: change(&apos;8&apos;)).grid(row=3, column=1)
button_9 = Button(frame_bord, text=&apos;9&apos;, width=5, height=2, command=lambda: change(&apos;9&apos;)).grid(row=3, column=2)
button_x = Button(frame_bord, text=&apos;x&apos;, width=5, height=2, command=lambda: change(&apos;*&apos;)).grid(row=3, column=3)

button_0 = Button(frame_bord, text=&apos;0&apos;, width=5, height=2, command=lambda: change(&apos;0&apos;)).grid(row=4, column=0)
button_dian = Button(frame_bord, text=&apos;.&apos;, width=5, height=2, command=lambda: change(&apos;.&apos;)).grid(row=4, column=1)
button_deng = Button(frame_bord, text=&apos;=&apos;, width=5, height=2, command=equal).grid(row=4, column=2)
button_chu = Button(frame_bord, text=&apos;/&apos;, width=5, height=2, command=lambda: operation(&apos;/&apos;)).grid(row=4, column=3)

button_auther = Button(frame_bord, text=&apos;&#x67E5;&#x770B;&#x4F5C;&#x8005;&apos;, width=25, height=2, command=lambda: print(&quot;KAFKA.M&quot;)).grid(row=5, column=0, columnspan=4)

frame_bord.pack(padx=20, pady=20)

# &#x5E95;&#x90E8;&#x533A;&#x57DF;
frame_bottom = Frame(width=400, height=10, bg=&apos;#575956&apos;)
bottom_label = Label(frame_bottom, text=&apos;by KAFKA.M&apos;, bg=&apos;#37ACA6&apos;, fg=&apos;#FFFFFF&apos;, font=(&apos;&#x5FAE;&#x8F6F;&#x96C5;&#x9ED1;&apos;, 12, &apos;bold&apos;), width=18, height=1, padx=0)
bottom_label.pack()
frame_bottom.pack()

win.mainloop()
```
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../home/11.多任务/3.协程实现多任务.html" class="navigation navigation-prev " aria-label="Previous page: 协程实现多任务"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../home/12.Python实战项目/2.自动售货机.html" class="navigation navigation-next " aria-label="Next page: 自动售货机"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
